//////////////////////////////////////////////////////////////////////////////////
//
//	avamods hill sniper limit
//		- Version 1.1
//		- 11.02.2006
//		- diamond-optic
//
//////////////////////////////////////////////////////////////////////////////////
//
// Information:
//
// - Progressive sniper limits once used on the avamods server (no longer used!)
//
//////////////////////////////////////////////////////////////////////////////////
//
// Changelog:
//
// - 11.02.2006 Version 1.1
//	Initial Release
//
//////////////////////////////////////////////////////////////////////////////////


#include <amxmodx>

new mapname[32]

public plugin_init() 
{
	register_plugin("avamods hill sniper limit", "1.1", "diamond-optic")
	register_cvar("avamods_hill_sniperlimit_stats", "1.1", FCVAR_SERVER|FCVAR_SPONLY)
}

public plugin_precache()
{
	get_mapname(mapname,31)
}
	
public client_putinserver(id)
{
	if(is_user_connected(id) && equali(mapname,"dod_hill_classic"))
		{
		new players_on = get_playersnum()
	
		if(players_on < 8)
			server_cmd("mp_limitaxisscopedkar 1; mp_limitalliesspring 1")
		else if(players_on > 7 && players_on < 12)
			server_cmd("mp_limitaxisscopedkar 2; mp_limitalliesspring 2")
		else if(players_on > 11)
			server_cmd("mp_limitaxisscopedkar 3; mp_limitalliesspring 3")
		}
}

public client_disconnect(id)
{
	if(is_user_connected(id) && equali(mapname,"dod_hill_classic"))
		{
		new players_on = get_playersnum()
	
		if(players_on < 8)
			server_cmd("mp_limitaxisscopedkar 1; mp_limitalliesspring 1")
		else if(players_on > 7 && players_on < 12)
			server_cmd("mp_limitaxisscopedkar 2; mp_limitalliesspring 2")
		else if(players_on > 11)
			server_cmd("mp_limitaxisscopedkar 3; mp_limitalliesspring 3")
		}	
}
